﻿using Bmz.Studio.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Bmz.Studio.EntityFramework.Mapping
{
    public partial class ContactMap:StudioEntityTypeConfiguration<Contact>
    {
        public ContactMap()
        {
            this.HasKey(p=>p.Id);
            this.Property(p => p.GuestName).HasMaxLength(50).IsRequired();
            this.Property(p => p.GuestEmail).HasMaxLength(50).IsRequired();
            this.Property(p => p.Subject).HasMaxLength(50).IsRequired();
            this.Property(p => p.Message).HasMaxLength(500).IsRequired();
            this.Property(p => p.CreateDatetime).IsRequired();
        }
    }
}
